<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>供应商管理</title>

    <!-- Favicon -->
    <link rel="shortcut icon" th:href="@{/assets/media/image/favicon.png}"/>

    <!-- Plugin styles -->
    <link rel="stylesheet" th:href="@{/vendors/bundle.css}" type="text/css">

    <!-- Datepicker -->
    <link rel="stylesheet" th:href="@{/vendors/datepicker/daterangepicker.css}">

    <!-- Vmap -->
    <link rel="stylesheet" th:href="@{/vendors/vmap/jqvmap.min.css}">

    <!-- App styles -->
    <link rel="stylesheet" th:href="@{/assets/css/app.css}" type="text/css">
</head>
<body class="container">
<!--自定义宽度-->
<!-- begin::preloader-->
<div class="preloader">
    <div class="preloader-icon"></div>
</div>
<!-- end::preloader -->

<!-- begin::header -->
<div th:replace="~{commons/header :: header}"></div>
<!-- end::header -->

<!-- begin::main -->
<div id="main">

    <!-- begin::navigation -->
    <div th:replace="~{commons/navigation :: navigation}"></div>
    <!-- end::navigation -->

    <!-- begin::main-content -->
    <div class="main-content">

        <!-- begin::page content -->
        <div class="container-fluid">

            <div class="row">
                <div class="col-md-12 card">
                    <div class="row anno">
                        <img th:src="@{/image/anno.png}">
                        合作供应商
                    </div>
                    <div>
                        <form th:action="@{/supplier/queryAllSupplier}" METHOD="GET">
                            <div style="margin-top:10px;margin-bottom: 5px;">
                                <span style="margin:10px;">供应商名称:</span>
                                <span style="margin:10px;"><input type="text" name="supplierName" th:value="${supplierName}"></span>
                                <span style="margin:10px;"><input type="submit" value="查询"></span>
                            </div>
                        </form>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-bordered text-center">
                            <thead>
                            <tr>
                                <th scope="col">序号</th>
                                <th scope="col">供应商名称</th>
                                <th scope="col">合作时间</th>
                                <th scope="col">合作类型</th>
                                <th scope="col">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="map,mapstart:${supplierList}">
                                <td th:text="${mapstart.count}">100000001</td>
                                <td th:text="${map.get('supplier_name')}">烟煤</td>
                                <td th:text="${#dates.format(map.get('cooperation_time'), 'yyyy-MM-dd HH:mm:ss')}">2015-08-21</td>
                                <td th:if="${map.get('supplier_type')=='general'}">一般供应商</td>
                                <td th:if="${map.get('supplier_type')=='temporary'}">临时供应商</td>
                                <td th:if="${map.get('supplier_type')=='internal'}">内部供应商</td>
                                <td th:if="${map.get('supplier_type')=='emphasis'}">重点供应商</td>
                                <td ><a th:href="${'/supplier/querySupplierDetails/'+map.get('supplier_id')}">查看</a></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <!--分页-->
                    <div class="row" style="padding-bottom: 15px">
                        <div class="col-sm-12 col-md-6">
                            <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
                                <ul class="pagination">
                                    <li class="paginate_button page-item previous disabled" th:if="${currentPage}==1">
                                        <a href="#" aria-controls="example2" data-dt-idx="0" tabindex="0" class="page-link" th:href="${'/supplier/queryAllSupplier'+'?pageIndex='+(currentPage)+'&pageSize='+(pageSize)}">Previous</a>
                                    </li>
                                    <li class="paginate_button page-item previous" th:if="${currentPage}!=1">
                                        <a href="#" aria-controls="example2" data-dt-idx="0" tabindex="0" class="page-link" th:href="${'/supplier/queryAllSupplier'+'?pageIndex='+(currentPage - 1)+'&pageSize='+(pageSize)}">Previous</a>
                                    </li>
                                    <div style="display: inline-block" th:each="i:${#numbers.sequence(1,pageNum)}">
                                        <li class="paginate_button page-item active" th:if="${currentPage==i}">
                                            <a href="#" aria-controls="example2" data-dt-idx="1" tabindex="0" class="page-link" th:text="${i}" th:href="${'/supplier/queryAllSupplier'+'?pageIndex='+i+'&pageSize='+pageSize}">1</a>
                                        </li>
                                        <li class="paginate_button page-item" th:if="${currentPage!=i}">
                                            <a href="#" aria-controls="example2" data-dt-idx="1" tabindex="0" class="page-link" th:text="${i}" th:href="${'/supplier/queryAllSupplier'+'?pageIndex='+i+'&pageSize='+pageSize}">1</a>
                                        </li>
                                    </div>
                                    <li class="paginate_button page-item disabled" th:if="${currentPage==pageNum}">
                                        <a href="#" aria-controls="example2" data-dt-idx="7" tabindex="0" class="page-link" th:href="${'/supplier/queryAllSupplier'+'?pageIndex='+(currentPage)+'&pageSize='+(pageSize)}">Next</a>
                                    </li>
                                    <li class="paginate_button page-item next"  th:if="${currentPage!=pageNum}">
                                        <a href="#" aria-controls="example2" data-dt-idx="7" tabindex="0" class="page-link" th:href="${'/supplier/queryAllSupplier'+'?pageIndex='+(currentPage + 1)+'&pageSize='+(pageSize)}">Next</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="col-sm-12 col-md-6" >
                            <div class="dataTables_info" style="line-height: 34px" id="example2_info" role="status" aria-live="polite">
                                Showing 1 to 10 of 57 entries
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!-- end::page content -->

        <!-- begin::footer -->
        <footer>
            <div class="container-fluid">
                <div>© 2019 Protable v1.0.0 Made by <a href="http://bootstrapmb.com">Laborasyon</a></div>
                <div>
                    <nav class="nav">
                        <a href="" class="nav-link">Licenses</a>
                        <a href="#" class="nav-link">Change Log</a>
                        <a href="#" class="nav-link">Get Help</a>
                    </nav>
                </div>
            </div>
        </footer>
        <!-- end::footer -->

    </div>
    <!-- end::main-content -->

</div>
<!-- end::main -->

<div th:include="~{commons/scripts :: scripts}"></div>

<!-- App scripts -->
<script th:src="@{/assets/js/app.js}"></script>
</body>

</html>